cd install_path
tar zcvf install_path/backup/$(date -d "today" +"%Y%m%d").tar.gz mysql
rm -rf install_path/backup/$(date -d "1 week ago" +"%Y%m%d").tar.gz